package com.lee.dubbo.service.dubbo;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lee.dubbo.service.domain.City;
import org.springframework.stereotype.Component;

/**
 * Created by liping on 2017/10/31.
 */
@Component
public class DubboConsumerService {
    @Reference(version = "1.0.0")
    CityDubboService cityDubboService;

    public City printCity() {
        City city = cityDubboService.getCity("whh", "ddd");
        System.out.println(city.getAddress() + "---" + city.getName());
        return city;
    }
}
